<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<link href="assets/css/bootstrap-select.css" rel="stylesheet"/>
<link href="assets/css/front/listCommonStyle.css" rel="stylesheet"/>
<link href="assets/css/modify.css" rel="stylesheet"/>
<script src="assets/js/select2/select2.js"></script>
<div class="row margin-left-10">
	<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
		<div class="widget flat margin-top-0" style="margin: -10px 0 0px 0!important;">
			<div class="widget-header bordered-sky theme-bordered nopadding">
				<div class="widget-buttons widget-label nomargin-bottom">
					<label class="businessBtns">
						<ol class="breadcrumb" style="margin: 0;">
							<li style="color: #809fa6;">基本设置</li>
							<li class="active" style="color: #23a8f5;">过渡收费设置</li>
						</ol>
					</label>
				</div>
			</div>
		</div>
	</div>
	<!-- 映射列表 -->
	<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
		<div class="widget flat searchCriteria " style="margin: 3px 0 0px 0!important;padding-bottom: 10px">
			<div class="widget-header bordered-sky theme-bordered nopadding">
				<div class="widget-buttons widget-label nomargin-bottom">
					<label class=" businessBtns">
						<label class="margin-right-10">
							<a class="btn btn-warning shiny add" serializeNum="${serializeNum}" editUrl="${editUrl}" style="border-radius: 0px;border: none;background: #ffab00  !important;">
								<i  class="fa fa-plus"></i>新增过渡收费方案
							</a>
						</label>
						<label class="margin-right-10">
							<a style="border-radius: 0px;border: none;background: #23a8f5 !important;"
							   class="btn btn-blue shiny download" onclick="exportData('${searchFormId}','MemberInformation.xlsx')"><i class="fa fa-share"></i>导出
							</a>
						</label>
						<label class="margin-right-10">
							<a style="border-radius: 0px;border: none;background: #ffab00 !important;"
							   class="btn btn-warning shiny search "><i class="fa fa-search"></i>搜索
							</a>
						</label>
						<!--<label onclick="iconsChange()" style="margin-right: 6px">-->
							<!--<label>-->
								<!--<a class="iconsChangeA" style="width: 13px;height: 13px;cursor: pointer;background: url('assets/img/nav-img/icon_hidden.png');display: block;-webkit-user-select:none; -moz-user-select:none; -ms-user-select:none;user-select:none;" value="1"></a>-->
							<!--</label>-->
							<!--<label style="color: #23a8f5 ;vertical-align: middle;padding-top:4px;">-->
								<!--<span class="iconsChangeSpan" style="-webkit-user-select:none; cursor: pointer;-moz-user-select:none; -ms-user-select:none;user-select:none;">隐藏搜索栏</span>-->
							<!--</label>-->
						<!--</label>-->
					</label>
				</div>
			</div>
		</div>
		<div class="widget flat radius-bordered" style="margin-top: 0;box-shadow:0px 0px 10px rgba(122,161,184,0.3);">
			<div class="widget-body no-padding">
				<div class="topPagingBar hidden">
					${pagingBar}
				</div>
				<div class="table-scrollable" style="border: none;" id="tableScrollable">
					<!-- 数据表列信息列表 -->
					<table class="table table-hover dataTable newtable">
						<thead>
						<tr>
							<th title="选择" class="checkboxColumnTh">
								<div class="checkbox">
									<label>
										<input type="checkbox" class="chkAll" onclick="chkAll()">
										<span class="text"></span>
									</label>
								</div>
							</th>
							<th title="属性名">序号</th>
							<th>操作项</th>
							<th title="收费名称">收费名称</th>
							<th title="一次性物品费半日">一次性物品费(半日)</th>
							<th title="一次性物品费全日">一次性物品费(全日)</th>

							<th title="">月餐点费标准值(半日)</th>

							<th title="">月餐点费限制值(半日)</th>

							<th title="">月餐点费标准值(全日)</th>

							<th title="">月餐点费限制值(全日)</th>

							<th title="当前状态(数据字典:preparatoryFeeSet)">状态</th>
							<th title="最后修改人">操作人</th>
							<th title="最后修改时间">操作日期</th>
						</tr>
						</thead>
						<tbody>
						<#if page_bean.list?size==0>
							<tr>
								<td align="center">无数据</td>
							</tr>
						</#if>
						<#list page_bean.list as data>
							<tr>
								<td class="checkboxColumnTd">
									<div class="checkbox">
										<label>
											<input type="checkbox" class="chk"  name="id" value="${data.id}">
											<span class="text"></span>
										</label>
									</div>
								</td>
								<td>${data_index+1+(page_bean.pageNo-1)*page_bean.pageSize}</td>
								<td align="center">
									<a style="color: #2679B8" class=" update margin-right-10" title="修改" href="javascript:void(0);"  serializeNum="${serializeNum}" editUrl="${editUrl}" targetDataId="${data.id}">修改</a>

									<#if data.isBlockUp==true>
										<a style="color: #2679B8"  onclick="updateTransitionFeeSetIsBlockUp(this)" title="停用"  value="${data.isBlockUp}" targetDateId="${data.id}" isBlockUp="false">停用</a>
									</#if>
									<#if  data.isBlockUp==false>
										<a style="color: #2679B8"  onclick="updateTransitionFeeSetIsBlockUp(this)"  title="恢复使用"  value="${data.isBlockUp}"  targetDateId="${data.id}" isBlockUp="true">恢复使用</a>
									</#if>
								</td>
								<td>${(data.name???string(data.name?html,"未设置"))!'未设置'}</td>
								<td>${(data.oneTimeItemsFeeHalfADay???string(data.oneTimeItemsFeeHalfADay?html,"未设置"))!'未设置'}</td>
								<td>${(data.oneTimeItemsFeeFullDay???string(data.oneTimeItemsFeeFullDay?html,"未设置"))!'未设置'}</td>
								<td>${(data.mealFeeStandardHalfDay???string(data.mealFeeStandardHalfDay?html,"未设置"))!'未设置'}</td>
								<td>${(data.mealFeeLimitStartHalfDay???string(data.mealFeeLimitStartHalfDay?html,"未设置"))!'未设置'}
									—— ${(data.mealFeeLimitEndHalfDay???string(data.mealFeeLimitEndHalfDay?html,"未设置"))!'未设置'}</td>
								<td>${(data.mealFeeStandardFullDay???string(data.mealFeeStandardFullDay?html,"未设置"))!'未设置'}</td>
								<td>${(data.mealFeeLimitStartFullDay???string(data.mealFeeLimitStartFullDay?html,"未设置"))!'未设置'}
									—— ${(data.mealFeeLimitEndFullDay???string(data.mealFeeLimitEndFullDay?html,"未设置"))!'未设置'}</td>
								<td>${(data.status???string(data.status?html,"未设置"))!'未设置'}</td>
								<td>${(data.empId???string(data.empId?html,"未设置"))!'未设置'}</td>
								<td>${(data.tfsUpdateTime???string(data.tfsUpdateTime?html,"未设置"))!'未设置'}</td>
							</tr>
						</#list>
						</tbody>
					</table>
				</div>
				${pagingBar}
			</div>
		</div>
	</div>
</div>
<script>
$(".selectpicker").select2();

/**
 * 对过渡收费是否停用操作
 * @param that
 */
function updateTransitionFeeSetIsBlockUp(that){
    var targetDateId = $(that).attr("targetDateId");
    var isBlockUp = $(that).attr("isBlockUp");
    ajaxRequest("tssTransitionFeesSetController/updateTransitionFeeSetByIsBlockUp.do", {
        targetDateId: targetDateId,
        isBlockUp: isBlockUp
    }, function (result) {
        alert(result.resMsg);
        if(result.resCode==200){
            toView('tssTransitionFeesSetController/tssTransitionFeesSetList.do',true,'POST',{pageSize:10})
        }
    }, function () {
        ajaxError("加载页面失败!")
    }, "post", "json")
}
</script>